<!--用户列表 http://fm.yikant.com/Manager/userList.html -->
<extend name="./App/Home/View/Manage/layout.html" />
<block name="content">
<!--左侧边-->
    <div class="left-bg">

        <div class="left-title">
            <span>E课堂</span>
        </div>

        <ul class="left-list">
           <li><a href="{:U('Manager/categoryList')}" class="left-a ">课程分类</a></li>
            <li><a href="{:U('Manager/classList')}" class="left-a ">课程管理</a></li>
            <li><a href="{:U('Manager/userList',array('status'=>1))}" class="left-a ">用户列表</a></li>
            <li><a href="{:U('Manager/compereList',array('status'=>3))}" class="left-a ">主持人列表</a></li>
            <li><a href="{:U('Manager/teachList',array('status'=>2))}" class="left-a left-aChg">讲师列表</a></li>
        </ul>
    </div>

<!--右侧内容-->
    <div class="right-bg">
        <!--头部-->
      <!--   <include file="./App/Home/View/Manage/top.html"/> -->
        <!--主体内容-->
        <div class="content-wrap">

            <div class="user-wrap">

                <div class="search-wrap">
                    <input type="text" name="condition"  class="search-input J-searchVal" value="{$where}" placeholder="请输入昵称">
                    <input type="button" value="搜索" class="search-btn J-search">
                </div>

                <ul class="user-listTitle">
                    <li style="width:20%">ID</li>
                    <li style="width:30%">头像</li>
                    <li style="width:25% ;margin-right: 26px">昵称</li>
                    <li style="width:20%">操作</li>
                </ul>

                <ul class="user-listWrap">
                    <if condition="$userlist">
                        <volist name="userlist" id="vo">
                            <li class="user-li J-li">
                                <ul class="user-listTr">
                                    <li style="width:20%">{$vo.id}</li>
                                    <li style="width:30%">
                                        <div class="user-headWrap">
                                            <img src="{$vo.headimgurl}" class="user-headImg">
                                        </div>
                                    </li>
                                    <li style="width:25% " title="{$vo.nickname}">{$vo.nickname}</li>
                                    <li style="width:20%">
                                        <a href="{:U('Manager/TsetUser',array('id'=>$vo['id']))}">删除</a> 
                                        <input type="hidden" value="{$vo['id']}" class="J-id">
                                    </li>
                                </ul>
                            </li>

                        </volist>
                        <else/>
                        <li class="list-no">暂无数据信息</li>
                    </if>

                </ul>

                <!--翻页-->
                <div class="page">{$page}</div>
            </div>

        </div>
    </div>


    <script>seajs.use("common/userPc/user")</script>
    <!--翻页插件-->
    <script type="text/javascript">
        function jsFunction(q){
            var _op = $(".J-opId").val();
            var _url = "{:U('Manager/teachList/pageNo/"+q+"')}";
            window.location.href=_url;
        }


        //搜索
        $(".J-search").click(function(){
            var paramObj = {};
            paramObj.condition = $.trim($(".J-searchVal").val());
            var param = '';
            $.each(paramObj,function(k,v){
                if(v != ""){
                    param += '/' + k + '/' + v;
                }
            })
            var _url = "{:U('Manager/teachList" + param +"')}";
            window.location.href = _url ;
        })
    </script>

</block>